home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Sapphire Collection / Software Vault (Sapphire Collection) (Digital Impact).ISO / cdr47 / ibrary30.zip / MOUSE.ASI < prev    next >
Text File  |  1994-02-20  |  1KB  |  41 lines

  1. REM  +----------------------------------------------------------------------+
  2. REM  |                                                                      |
  3. REM  |         IBRARY  Copyright (c) 1993-1994  Thomas G. Hanlin III        |
  4. REM  |                                                                      |
  5. REM  +----------------------------------------------------------------------+
  6.  
  7.  
  8.    CALL SUB "MInit" Buttons
  9.    IF Buttons = 0 THEN
  10.       PRINT "No mouse installed"
  11.       END
  12.    ENDIF
  13.    CLS
  14.    PRINT "This simple demo just shows whether the left and/or right mouse buttons"
  15.    PRINT "are pressed, and turns off the text cursor. To exit the demo, press any"
  16.    PRINT "key on the keyboard."
  17.  
  18.    CALL SUB "CursorInfo" Visible StartLine EndLine MaxLine
  19.    CALL SUB "SetCursor" 32 0
  20. MouseWatcher:
  21.    LOCATE 4, 1
  22.    CALL SUB "MLButton" IsDown
  23.    PRINT "Left button is ";
  24.    IF IsDown = 0 THEN
  25.       PRINT "not pressed"
  26.    ELSE
  27.       PRINT "PRESSED    "
  28.    ENDIF
  29.    CALL SUB "MRButton" IsDown
  30.    PRINT "Right button is ";
  31.    IF IsDown = 0 THEN
  32.       PRINT "not pressed"
  33.    ELSE
  34.       PRINT "PRESSED    "
  35.    ENDIF
  36.    K$ = INKEY$
  37.    IF K$ = "" THEN MouseWatcher:
  38.  
  39.    CALL SUB "SetCursor" StartLine EndLine
  40.    END
  41.